<!-- directive:title 原生事件调用NG 动态定位scope -->
<!-- directive:breadcrumb 原生事件调用NG -->
<div class="panel-body">
    <h2 class="m-t-none"><a href>原生事件中调用angular方法</a></h2>
    <hr />
    <h5 class="">原生事件中调用angular方法, 比如 input的onChange事件想调用angular里面定义的方法</h5>
    <h5 class=""> - onChange="angular.element(this).scope().uploadPhoto(this)"</h5>
    <script type="text/xianjs" ui-bs>
        <div class="col-md-2">  
            <input type="file" style="display: none;width: 0px;height: 0px;"
                onChange="angular.element(this).scope().uploadPhoto(this)"
                ng-model="$parent.photos[$index]"
                name="newImg_{{$index}}" id="newImg_{{$index}}"/>
            <button class="button button-energized" style="margin-bottom: 2px;" ng-click="selectPhoto($index)">
                <i class="ion-android-upload"></i> <span>上传图片</span>
            </button>
            <button ng-if="$index>0" class="button button-energized" ng-click="delImg($index)">
                <i class="ion-android-close"></i> <span>删除图片</span>
            </button>
        </div>
    </script>
</div>